﻿<UserControl x:Class="News.Controls.FeedItem"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:Properties="clr-namespace:News.Properties" mc:Ignorable="d" 
             d:DesignHeight="100" d:DesignWidth="300" Margin="0,5,5,0" FontFamily="pack://application:,,,/Fonts/#Droid Sans" Opacity="0" MouseLeftButtonUp="UserControlMouseLeftButtonUp">
    <UserControl.RenderTransform>
        <TranslateTransform X="-50"/>
    </UserControl.RenderTransform>
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="UserControl.Loaded">
            <BeginStoryboard>
                <Storyboard>
                    <DoubleAnimation x:Name="TranslateAnim" Storyboard.TargetProperty="(RenderTransform).X" From="-100" To="0" Duration="0:0:0.4" DecelerationRatio="0.3"/>
                    <DoubleAnimation x:Name="OpacityAnim" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.4"/>
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
    </UserControl.Triggers>
    <StackPanel>
        <TextBlock Margin="10,0,10,0" Name="TitleBox" Foreground="White" FontWeight="Bold" TextOptions.TextFormattingMode="Display" FontSize="16" TextWrapping="Wrap" TextTrimming="CharacterEllipsis"  MaxHeight="50" Cursor="Hand"/>
        <DockPanel Name="ContentPanel" Margin="10,10,10,0" MaxHeight="52">
            <Image Name="Image" MaxWidth="50" DockPanel.Dock="Left" Margin="0,0,5,0" Visibility="Collapsed" Stretch="UniformToFill" RenderOptions.BitmapScalingMode="HighQuality"/>
            <TextBlock Margin="0,-3,0,-3" Name="DescriptionBox" TextWrapping="Wrap" TextTrimming="CharacterEllipsis" Foreground="White" FontSize="16" TextOptions.TextFormattingMode="Display"/>
        </DockPanel>
        <TextBlock Name="FromBox" Margin="10,8,10,0" Foreground="White" TextOptions.TextFormattingMode="Display" FontSize="12" TextTrimming="CharacterEllipsis" FontFamily="pack://application:,,,/Fonts/#Droid Serif" FontStyle="Italic">
            <Run Name="DateBox"/>
            <Run Text="{x:Static Properties:Resources.From}"/>
            <Run Name="ChannelBox"/>
        </TextBlock>
        <Rectangle Height="1"  Fill="Gray" Margin="-5,10,-5,0"/>
    </StackPanel>
</UserControl>
